package com.ck.ck_back.service.impl;

import com.ck.ck_back.service.manage;
import com.ck.ck_back.utils.md5_add;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.stereotype.Service;

@Service
public class manageImpl implements manage {
    @Override
    public int login(String username, String pwd) {
        if (username!=null&&!username.equals("")&&pwd!=null&&!pwd.equals("")){
            if (username.equals("admin")&&pwd.equals(DigestUtils.md5Hex("admin123456"))){
                return 1;
            }else {return 2;}
        }else {return 404;}
    }
}
